import torch
from torch import nn
from torch.nn import functional as F
import logging as log

log.basicConfig(level=log.INFO)
log = log.getLogger()

X = torch.randn(32, 3, 480, 640) # B,c,h,w
conv1 = nn.Conv2d(in_channels = 3, out_channels = 16, 
                  stride = 1, kernel_size = 3, padding = (1, 1))
y = conv1(X)
# 卷积层都是为了是特征图越提越多，并且不改变特征图大小,会使得计算量增加
log.info(y.shape)

#查看weights的形状
log.info(conv1.state_dict()["weight"].shape)

#查看bias的形状
log.info(conv1.state_dict()["bias"].shape)

